/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * Author: zhaosj
 * Date: 2011-3-8 下午02:08:08
 */
package com.array;

/**
 * @author zhaosj
 *
 */
public class Array1 {
	
	// 存储字符

	private String s = "";

	// 要取的字符目录

	public static String[] c = {"1","2","4"};

	// 父对象

	//public String father = null;

	public Array1() {

	}

	/****

	* 利用递归进行排列组合算法 打印出所有可能的组合

	*

	* @param j

	* @param t

	*/

	public void show(int j, Array1 t) {

		for (int i = 0; i < c.length; i++) {

				this.s = t.s + c[i];

				if (j == 1) {

					System.out.println(this.s.toString());

				}

				if ((j - 1) != 0)

						new Array1().show(j - 1, this);

				else

					continue;

		}

	}

	public static void main(String[] a) {

	// 从{ "1", "2", "3","4","5","6","7","8","9","0"}取出11个数进行组合，打印出所有的可能

		new Array1().show(3, new Array1());

	}



}
